-- GENERATED SPELL FOR [Sunseeker Netherbinder] --


function spell0_20059(pUnit, Event) --@Arcane Nova,Self--
pUnit:FullCastSpellOnTarget(35261,pUnit)
pUnit:RegisterEvent('Sorts_20059', 602, 1)
end

function spell1_20059(pUnit, Event) --@Arcane Nova,Self--
pUnit:FullCastSpellOnTarget(38936,pUnit)
pUnit:RegisterEvent('Sorts_20059', 589, 1)
end

function spell2_20059(pUnit, Event) --@Dispel Magic,n/a--
pUnit:FullCastSpellOnTarget(17201,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20059', 571, 1)
end

function Sorts_20059(pUnit, Event)
local choix_sorts_20059 = math.random(0, 2)
if choix_sorts_20059 == 0 then
pUnit:RegisterEvent('spell0_20059', 1, 1)
end
if choix_sorts_20059 == 1 then
pUnit:RegisterEvent('spell1_20059', 1, 1)
end
if choix_sorts_20059 == 2 then
pUnit:RegisterEvent('spell2_20059', 1, 1)
end
end

function mob20059_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_20059', math.random(1500, 3000), 1)
end

function mob20059_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20059_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20059_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(20059, 1, 'mob20059_Action')
RegisterUnitEvent(20059, 2, 'mob20059_Leave')
RegisterUnitEvent(20059, 3, 'mob20059_Kill')
RegisterUnitEvent(20059, 4, 'mob20059_Die')
